package storage

import "mini-sql/model"

// StoreStat 存储的状态信息
type StoreStat struct {
	MemUsed int64
}

type StoreInterface interface {
	CreateRowID() (int64, error)
	UpdateRowID(rowID int64) error
	InsertRow(row model.TableTuple) error
	UpdateRow(tuple model.TableTuple) error
	DeleteRow(tuple model.TableTuple) error
	GetRow(rowId int64) *model.TableTuple
	GetIterator() StoreIterator
	GetStat() *StoreStat
}

type StoreIterator interface {
	GetNextTuple() (*model.TableTuple, error)
}
